<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="UTF-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="format-detection" content="telephone=no" />
		<meta name="viewport" content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
		<script src="../../script/mui.min.js"></script>
		<script src="../../script/jquery.min.js"></script>
		<link rel="stylesheet" href="../../css/mui.min.css" />
		<link rel="stylesheet" href="../../css/CFNetPP_Base.css">
		<link rel="stylesheet" type="text/css" href="../../css/weui.min.css">
		<link rel="stylesheet" href="../../css/base.css"/>
		<link rel="stylesheet" href="../../css/personal.css">
		<link rel="stylesheet" href="../../css/exam.css">
		<link rel="stylesheet" href="../../css/swiper-3.4.2.min.css">
		<title>老师批改测验结果页</title>
		<script type="text/javascript" charset="utf-8">
			mui.init();
		</script>
		<style>
					.pingfen  label ~
			input {
				float: left;
				width: 25%;
				height: 70%;
				padding: 8px 0px;
				margin-bottom: 0;
				padding-left: 0;
				border: 1px solid #d9d9d9;
			}
			.pingfen  label {
				font-family: 'Helvetica Neue', Helvetica, sans-serif;
				line-height: 1.1;
				vertical-align: middle;
				float: left;
				width: 19%;
				padding: 0.7em 0;
				padding-left: 0.8em;
				padding-right: 0.2em
			}
			.pingfen  span {
				font-family: 'Helvetica Neue', Helvetica, sans-serif;
				line-height: 1.1;
				vertical-align: middle;
				float: left;
				width: 55%;
				padding: 0.7em 0.1em;
			}
			.weui_mask {
				position: fixed;
				z-index: 998;
				top: 0;
				right: 0;
				bottom: 0;
				left: 0;
			}
			.weui_dialog {
				z-index: 999;
			}
			.swiper-wrapper {
				min-height: 400px
			}
			.Empty_title  .mui-checkbox input[type=checkbox]:checked, .Empty_title .mui-radio input[type=radio]:checked {
				border: 1px solid #333;
				background: 0 0;
			}
			.Empty_title  .mui-checkbox input[type=checkbox]:checked:before, .Empty_title .mui-radio input[type=radio]:checked:before {
				color: #333;
			}
			.questionItemImgDiv {
				height: 12em;
				width: 80%;
				max-height: 14em;
				max-width: 95%;
				margin-left: 13px;
			}
			.xuanzeImgDiv {
				width: 80%;
				height: 8em;
				max-height: 10em;
			}
			.tiankong {
				font-family: inherit;
				border-bottom: 1px solid #000;
				margin: 0 8px;
				text-align: center;
				width: auto;
				/*word-break:break-all*/
			}
			.question_video_div {
				padding: 10px 10px;
				padding-left: 20px;
			}
			.question_video_div	video {
				width: 100%;
				height: 13em;
				background-color: black;
			}
			.question_video_div	img {
				width: 100%;
				height: 10em;
				background-color: black;
			}
			.option_video_div {
				padding: 10px 10px;
				padding-left: 55px;
			}
			.option_video_div	img {
				width: 100%;
				height: 8em;
				background-color: black;
			}
			.option_video_div	video {
				width: 100%;
				height: 12em;
			}
			table {
				border: 1px solid #ccc;
				border-collapse: collapse;
				border-spacing: 0;
			}
			td, th {
				border: 1px solid #ccc;
				padding: 0;
				text-align: center;
				color: #000000
			}
			.analysisdiv img{
			
			width: 100%
			}
		</style>
	</head>
	<body >
		<div class="stu-test" id="scroll">
			<div class="base_style_color" id='BarAppearance' style="height: 22px;width: 100%; position:fixed; left: 0px;top:0px;z-index: 998" ></div>
			<div class="base_navigation_bar base_style_color base_navigation_item_bar" style="position: fixed;left: 0px;top: 20px;">
				<a class="base_left_item" href="#" onclick="backTestToast()"> <img class="base_back_icon" src="../../image/icon_jiantou.png" alt=""> </a>
				<span id="title"></span>
				<!--<a class="base_right_item " id="describe"  onclick="openBewrite()" style="display: none;"> 描述</a>-->
			</div>
			<div class="ReviewWeekly_div  " style="margin-top: 64px"></div>
			<div class="space10"></div>
			<div class="k-con-border qusetion-type" >
				<div class="k-con-part" style="position: static">
					<p class="k-text-center k-c323 k-f12">
						<span class="test-score-detail "> 试卷分数：<span class="k-cred" id="score"></span>分 </span>
						<span class="test-score-detail"> 通过分数：<span class="k-cred" id="passscore"></span>分 </span>
						<span class="test-score-detail"> 考试时间：<span class="k-cred" id="kstime"></span>分 </span>
					</p>
				</div>
			</div>
			<div class="k-con test-m-bottom70 test-analysis" id="question_div">
				<div class="swiper-container">
					<div class="swiper-wrapper" >
						<!--		<div class="swiper-slide" id="item' + (i + 1) + '" itemtype="' + data[i].qtype + '">
						<div class="k-con-part3 clearfix">
						<span id="itemType" class="k-f18">论述题</span>
						<p class="k-f16 k-c323 k-mt5 indent-5">
						1.方法
						</p>
						<div class="test-answer-list left_15" ></div>
						</div>
						<div class="mui-input-row pingfen"style="margin-top: 23px">
						<label>评分:</label>
						<span style="color: red">5分</span>
						</div>
						</div>-->
					</div>
				</div>
			</div>
			<div class="k-con1 k-text-center k-fixed-bottom test-bottom1" id="sub_bt">
				<div class="k-con-part1">
					<span class="test-score-detail2"> 学生分数：<span class="k-cred" id="your_score" ></span>分 </span>
				</div>
				<div class="test_card_div2">
					<a class="base_right_item "style="color: #18B4ED" href="#popover-card">答题卡 </a>
				</div>
			</div>
			<div id="popover-card" class="mui-popover test-num-card" style=" width: 98%;height: 400px">
				<div class="mui-scroll-wrapper">
					<div class="mui-scroll" id="scroll-card">
						<div class="objective_item_div">
							<div class="left_15" id="scroll-card" style="text-align: center"></div>
						</div>
					</div>
				</div>
			</div>
		</div>
		<div id="offlineAlert" class="weui_dialog_confirm" style="display: none;">
			<div class="weui_mask"></div>
			<div class="weui_dialog">
				<div class="weui_dialog_hd">
					<strong class="weui_dialog_title" id="checkNum"></strong>
				</div>
				<div class="weui_dialog_bd"></div>
				<div class="weui_dialog_ft">
					<a onclick="cleanCancel()" href="#" class="weui_btn_dialog default"  style="color:#18b4ed">取消</a>
					<a onclick="cleanConfirm()" href="#" class="weui_btn_dialog primary"  style="color:#18b4ed">确定</a>
				</div>
			</div>
		</div>
		<div class="weui_dialog_alert" id="closeAlert" style="display: none;">
			<div class="weui_mask"></div>
			<div class="weui_dialog">
				<div class="weui_dialog_hd">
					<strong class="weui_dialog_title" id="checkNum2"></strong>
				</div>
				<div class="weui_dialog_ft">
					<a onclick="Cancel()" href="#" class="weui_btn_dialog primary"  style="color:#18b4ed">确定</a>
				</div>
			</div>
		</div>
	</body>
	<script type="text/javascript" src="../../script/api.js"></script>
	<script src="../../script/jquery.min.js" type="text/javascript"></script>
	<script type="text/javascript" src="../../script/MD5.js"></script>
	<script src="../../script/common.js"></script>
	<script type="text/javascript" src="../../script/requestTool.js"></script>
	<script src="../../script/swiper-3.4.2.jquery.min.js" type="text/javascript"></script>
	<script src="../../script/TestUi.js" type="text/javascript"></script>
	<script type="text/javascript" src="../../script/attachmentManager.js"></script>
	<script type="text/javascript">
		var daan = new Object();
		//题目名称数组
		var itemNameArr = new Array();
		var pid = "";
		// 计划id
		var cid = "";
		//课程id
		var chapterid = "";
		//章节id
		var tid = "";
		var stime = "";
		var json_jieguo = new Object();
		var Subjective_questionLen = '';
		var Objective_questionLen = '';
		var questionLen = '';
		var qidArr = new Array();
		var clickNum = "";
		apiready = function() {
			if (api.pageParam.type == 0) {//mocc
				sendBuriedNotifi('0', 'Mocc测验老师批阅结果页', '017');
			} else {
				sendBuriedNotifi('0', '自由课程测验老师批阅结果页', '059');
			}
			var h = api.winHeight * 0.3;
			$('#popover-card').css('height', h);
			var pageParam = api.pageParam;
			$('#title').text(api.pageParam.rename);
			showProgress();
			scrollUI();
			//获取数据
			loadData();
			// 滚动监听
			listenScroll();
			kebackListen()
		}
		function sendBuriedNotifi(busionessid, pagetype, pagetypeid) {
			var userinfo = {
				uid : $api.getStorage('cfnetppuid'),
				jid : $api.getStorage('cfnetppjxid'),
				uname : $api.getStorage('cfnetppusername'),
				vid : api.pageParam.vid,
				cid : api.pageParam.cid,
				pid : api.pageParam.pid,
			}
			var data = {
				busionessid : busionessid,
				pagetype : pagetype,
				pagetypeid : pagetypeid,
				sourceurl : api.pageParam.sourceurl,
				sourcetitle : api.pageParam.sourcetitle,
				accesspageurl : window.location.pathname,
				accesspagetitle : document.title,
				userinfo : userinfo
			}
			SendBehaviorTrajectoriesNotifi_Study(data);
		}

		function backClick() {
			api.closeWin();
		}

		//自由课程获取已提交测验信息
		function loadData() {
			var params = {
				cuid : api.pageParam.cuid,
				jid : $api.getStorage('cfnetppjxid'),
				tid : api.pageParam.tid,
				vid : api.pageParam.vid,
				cid : api.pageParam.cid,
				pid : api.pageParam.pid,
				cjid : api.pageParam.cjid,
			};
			cfnetppPOST(url_getTestScoreList, params, true, function(data, status) {
				//			 popu(url_getTestScoreList);
				//			 popu(params);
				api.hideProgress();
				if (status == 'success') {
					if (data.status == 1) {
						var jsonData = data.data;
						var classDatas = JSON.parse(jsonData.timudetail);
						if (classDatas != null && classDatas != '') {
							$('#passscore').text(jsonData.passscore);
							$('#kstime').text(jsonData.elapse);
							$('#your_score').text(parseFloat(jsonData.score).toFixed(1));
							$('#score').text(numNull(jsonData.testscore));
							GetHtmlTestList(classDatas);
						} else {
							back('题目为空');
						}
					} else {
						api.toast({
							msg : '网络异常,获取题目失败',
							duration : 2000,
							location : 'bottom'
						});
					}
				} else {
					api.toast({
						msg : '网络异常,获取题目失败',
						duration : 2000,
						location : 'bottom'
					});
				}
			});
		}

		function GetHtmlTestList(list) {
			var data = list;
			var dataArr = new Array();
			var subjectiveArr = new Array();
			var objectiveArr = new Array();
			var danArr = new Array();
			var duoArr = new Array();
			var panArr = new Array();
			var shituArr = new Array();
			var paixuArr = new Array();
			var shipinArr = new Array();
			var lunshuArr = new Array();
			var anliArr = new Array();
			var chuanArr = new Array();
			if (data != null && data != '') {
				if (data.dan != undefined && data.dan.length > 0 && data.dan != '' && data.dan != null) {
					for (var i = 0; i < data.dan.length; i++) {
						var weeklyData = data.dan[i];
						danArr.push(weeklyData);
					}
				}
				if (data.duo != undefined && data.duo.length > 0 && data.duo != '' && data.duo != null) {
					for (var i = 0; i < data.duo.length; i++) {
						var duoData = data.duo[i];
						duoArr.push(duoData);
					}
				}
				if (data.pan != undefined && data.pan.length > 0 && data.pan != '' && data.pan != null) {
					for (var i = 0; i < data.pan.length; i++) {
						var panData = data.pan[i];
						panArr.push(panData);
					}
				}
				if (data.lunshu != undefined && data.lunshu.length > 0 && data.lunshu != '' && data.lunshu != null) {
					for (var i = 0; i < data.lunshu.length; i++) {
						var lunshuData = data.lunshu[i];
						lunshuArr.push(lunshuData);
					}
				}
				if (data.shitu != undefined && data.shitu.length > 0 && data.shitu != '' && data.shitu != null) {
					for (var i = 0; i < data.shitu.length; i++) {
						var shituData = data.shitu[i];
						shituArr.push(shituData);
					}
				}
				if (data.paixu != undefined && data.paixu.length > 0 && data.paixu != '' && data.paixu != null) {
					for (var i = 0; i < data.paixu.length; i++) {
						var paixuData = data.paixu[i];
						paixuArr.push(paixuData);
					}
				}
				if (data.shipin != undefined && data.shipin.length > 0 && data.shipin != '' && data.shipin != null) {
					for (var i = 0; i < data.shipin.length; i++) {
						var shipinData = data.shipin[i];
						shipinArr.push(shipinData);
					}
				}
				if (data.anli != undefined && data.anli.length > 0 && data.anli != '' && data.anli != null) {
					for (var i = 0; i < data.anli.length; i++) {
						var anliData = data.anli[i];
						anliArr.push(anliData);
					}
				}
				if (data.chuan != undefined && data.chuan.length > 0 && data.chuan != '' && data.chuan != null) {
					for (var i = 0; i < data.chuan.length; i++) {
						var chuanData = data.chuan[i];
						chuanArr.push(chuanData);
					}
				}
				dataArr = dataArr.concat(danArr, duoArr, panArr, shituArr, paixuArr, shipinArr, lunshuArr, chuanArr, anliArr);
				objectiveArr = objectiveArr.concat(lunshuArr, anliArr, chuanArr);
				SetUI(dataArr, subjectiveArr, objectiveArr);
			}
		}

		// 滚动监听
		function listenScroll() {
			var winHeight = $(window).height();
			//获取当前页面高度
			$(window).resize(function() {
				var thisHeight = $(this).height();
				if (winHeight - thisHeight > 50) {
					//当软键盘弹出，在这里面操作
					$("#sub_bt").css('display', 'none');
				} else {
					$("#sub_bt").css('display', 'block');
					//当软键盘收起，在此处操作
				}
			});
		}

		function SetUI(list, subjectiveArr, objectiveArr) {
			var qxuan = '';
			var data = list;
			questionLen = data.length;
			popoverCardNum(questionLen);
			var userchoose = '';
			var questionStr = '';
			var xuanzeStr = '';
			for (var i = 0; i < questionLen; i++) {
				if (data[i] != null && data[i] != '') {
					qxuan = ArrayIsNull(JSON.parse(data[i].qxuanxiang));
					$(".swiper-wrapper").append('<div class="swiper-slide" id="item' + (i + 1) + '" itemtype="' + data[i].qtype + '"></div>')
					var qdaanStr = '';
					questionStr = questionsImgIsNull(data[i].questions);
					scoreStr = (i + 1) + '/' + questionLen + "." + "(" + judgeQuestionScore(data[i]) + "分)";
					if (data[i].qtype == 1 || data[i].qtype == 3 || data[i].qtype == 8) {
						//											     alert(JSON.stringify(data[i]));
						if (data[i].dtjieguo == data[i].qdaan) {//答案正确
							qdaanStr = '<p class="k-cred left_10">' + "正确答案:" + data[i].qdaan + '</p>'
							$("#scroll-card").find("span").eq(i).removeClass('qusetion-num-normal').addClass('qusetion-num-true');
						} else if (data[i].dtjieguo == "" || data[i].dtjieguo == null) {
							qdaanStr = '<p class="k-cred left_10">' + "未答题" + '</p>'
						} else {
							$("#scroll-card").find("span").eq(i).removeClass('qusetion-num-normal').addClass('qusetion-num-false');
							qdaanStr = '<p class="k-cred left_10">' + "正确答案:" + data[i].qdaan + '</p>'
						}
						$("#item" + (i + 1)).append('<div class="k-con-part3 clearfix">' + '<span id="itemType" class="k-f18">' + ByIdGetQuestionTypeName(data[i].qtype) + '</span>' + '<p class="k-f16 k-c323 k-mt5 indent-5">' + scoreStr + questionStr + '</p>' + qdaanStr + '<div class="test-answer-list left_10" >' + '</div>' + '</div>' + '<div class="mui-input-row "style="margin-top: 23px">' + '</div>')
						//
						//	是单选或判断
						for (var k = 0; k < qxuan.length; k++) {
							var xuanzeStr1 = data[i].qtype != 3 ? qxuan[k].xuanzhe : panxuanzeReturnStr(k);
								xuanzeStr = xuanzheImgIsNull(xuanzeStr1);
							if (data[i].dtjieguo != "" && data[i].dtjieguo != null) {
								if ((k + 1 ) != charCodeAt(data[i].dtjieguo)) {
									$("#item" + (i + 1) + " .test-answer-list").append('<div class="mui-input-row mui-radio mui-left " >' + xuanzeStr  + '<input dataindex="' + (k + 1) + '"  onclick="return false;"   name="radio' + data[i].qid + '" type="radio"   >' + '</div> ')
								} else {
									$("#item" + (i + 1) + " .test-answer-list").append('<div class="mui-input-row mui-radio mui-left " >' + xuanzeStr  + '<input dataindex="' + (k + 1) + '"    onclick="return false;"   name="radio' + data[i].qid + '" type="radio"   checked="checked" >' + '</div> ')
								}
							} else {
								$("#item" + (i + 1) + " .test-answer-list").append('<div class="mui-input-row mui-radio mui-left Empty_title" >' + xuanzeStr  + '<input dataindex="' + (k + 1) + '"    onclick="return false;"   name="radio' + data[i].qid + '" type="radio"    >' + '</div> ')
							}
						}
						//
					} else if (data[i].qtype == 2 || data[i].qtype == 9) {
						if (data[i].qdaan != null) {
							var qdaanArr = strIsNullSpite(data[i].qdaan);
							var jsonObject1 = strIsNullSpite(data[i].dtjieguo)
							var userchooseLetter = [];
							for (var j = 0; j < jsonObject1.length; j++) {
								userchooseLetter.push(charCodeAt(jsonObject1[j]))
							}
							if (jsonObject1.toString() == qdaanArr.toString()) {//答案正确
								qdaanStr = '<p class="k-cred left_10">' + "正确答案:" + data[i].qdaan + '</p>'
								$("#scroll-card").find("span").eq(i).removeClass('qusetion-num-normal').addClass('qusetion-num-true');
							} else if (jsonObject1.toString() == "" || jsonObject1.toString() == null) {
								qdaanStr = '<p class="k-cred left_10">' + "未答题" + '</p>'
							} else {
								$("#scroll-card").find("span").eq(i).removeClass('qusetion-num-normal').addClass('qusetion-num-false');
								qdaanStr = '<p class="k-cred left_10">' + "正确答案:" + data[i].qdaan + '</p>'
							}
							$("#item" + (i + 1)).append('<div class="k-con-part3 clearfix">' + '<span id="itemType" class="k-f18">' + ByIdGetQuestionTypeName(data[i].qtype) + '</span>' + '<p class="k-f16 k-c323 k-mt5 indent-5">' + scoreStr + questionStr + '</p>' + qdaanStr + '<div class="test-answer-list left_10" >' + '</div>' + '</div>' + '<div class="mui-input-row "style="margin-top: 23px">' + '</div>')
							//	是多选
							for (var k = 0; k < qxuan.length; k++) {
							     xuanzeStr = xuanzheImgIsNull(qxuan[k].xuanzhe);
								if (userchooseLetter.toString().indexOf(k + 1) == -1) {
									$("#item" + (i + 1) + " .test-answer-list").append('<div class="mui-input-row mui-checkbox mui-left" >' + xuanzeStr  + '<input dataindex="' + (k + 1) + '" name="checkbox1"  onclick="return false;"    value="Item 1" type="checkbox"  itemid="' + data[i].qid + '">' + '</div>')
								} else {
									$("#item" + (i + 1) + " .test-answer-list").append('<div class="mui-input-row mui-checkbox mui-left" >' + xuanzeStr  + '<input dataindex="' + (k + 1) + '"  checked="checked"   onclick="return false;"  name="checkbox1" value="Item 1" type="checkbox"  itemid="' + data[i].qid + '">' + '</div>')
								}
							}
						} else {
							var qdaanStr = '<p class="k-cred left_10">' + "此题没有正确答案:" + '</p>'
							$("#item" + (i + 1)).append('<div class="k-con-part3 clearfix">' + '<span id="itemType" class="k-f18">' + ByIdGetQuestionTypeName(data[i].qtype) + '</span>' + '<p class="k-f16 k-c323 k-mt5 indent-5">' + scoreStr + questionStr + '</p>' + qdaanStr + '<div class="test-answer-list left_10" >' + '</div>' + '</div>' + '<div class="mui-input-row "style="margin-top: 23px">' + '</div>')
							for (var k = 0; k < qxuan.length; k++) {
								xuanzeStr = xuanzheImgIsNull(qxuan[k].xuanzhe)
								$("#item" + (i + 1) + " .test-answer-list").append('<div class="mui-input-row mui-checkbox mui-left" >' + xuanzeStr  + '<input dataindex="' + (k + 1) + '"  checked="checked"   onclick="return false;"  name="checkbox1" value="Item 1" type="checkbox"  itemid="' + data[i].qid + '">' + '</div>')
							}
						}
					} else if (data[i].qtype == 4 || data[i].qtype == 10) {//论述题
						var qdaanStr = '<div class="k-cred left_10 analysisdiv">' + "正确答案:" + htmlDecodeByRegExp(data[i].qjiexi) + '</div>';
						var pingfen = data[i].pingfen
						if (pingfen != null && pingfen != "") {//已被老师评分
							pingfenStr = '<div class="mui-input-row pingfen"style="margin-top: 23px">' + '<label>评分:' + '</label>' + ' <span style="color: red">' + data[i].pingfen + '分' + '</span>' + '</div>'
							$("#scroll-card").find("span").eq(i).removeClass('qusetion-num-normal').addClass('qusetion-num-true');
						} else {
							pingfenStr = '<div class="mui-input-row pingfen"style="margin-top: 23px">' + '<label>评分:' + '</label>' + ' <span style="color: red">' + '请耐心等待老师批改' + '</span>' + '</div>'
						}
						$("#item" + (i + 1)).append('<div class="k-con-part3 clearfix">' + '<span id="itemType" class="k-f18">' + ByIdGetQuestionTypeName(data[i].qtype) + '</span>' + '<p class="k-f16 k-c323 k-mt5 indent-5">' + scoreStr + questionStr + '</p>' + qdaanStr + '<div class="test-answer-list left_10" >' + '</div>' + '</div>' + pingfenStr)
						// 论述
						$("#item" + (i + 1) + " .test-answer-list").append('<div class="test-answer-list">' + '<textarea  class="k-texttarea k-f14" readonly="readonly"    id="content" itemid="' + data[i].qid + '">' + isStringNull(data[i].dtjieguo) + '</textarea>' + '</div>')
					} else if (data[i].qtype == 7) {//识图题
						var qdaanArr = strIsNullSpite(data[i].qdaan);
						var jsonObject1 = strIsNullSpite(data[i].dtjieguo)
						var userchooseLetter = [];
						for (var j = 0; j < jsonObject1.length; j++) {
							userchooseLetter.push(charCodeAt(jsonObject1[j]))
						}
						if (jsonObject1.toString() == qdaanArr.toString()) {//答案正确
							qdaanStr = '<p class="k-cred left_10">' + "正确答案:" + data[i].qdaan + '</p>'
							$("#scroll-card").find("span").eq(i).removeClass('qusetion-num-normal').addClass('qusetion-num-true');
						} else if (jsonObject1.toString() == "" || jsonObject1.toString() == null) {
							qdaanStr = '<p class="k-cred left_10">' + "未答题" + '</p>'
						} else {
							$("#scroll-card").find("span").eq(i).removeClass('qusetion-num-normal').addClass('qusetion-num-false');
							qdaanStr = '<p class="k-cred left_10">' + "正确答案:" + data[i].qdaan + '</p>'
						}
						$("#item" + (i + 1)).append('<div class="k-con-part3 clearfix">' + '<span id="itemType" class="k-f18">' + ByIdGetQuestionTypeName(data[i].qtype) + '</span>' + '<p class="k-f16 k-c323 k-mt5 indent-5">' + scoreStr + questionStr + '</p>' + qdaanStr + '<div class="test-answer-list left_10"  itemtype="' + data[i].qtype + '">' + '</div>' + '</div>')
						for (var k = 0; k < qxuan.length; k++) {
							xuanzeStr = xuanzheImgIsNull(qxuan[k].xuanzhe)
							if (userchooseLetter.toString().indexOf(k + 1) == -1) {//是否对错
								$("#item" + (i + 1) + " .test-answer-list").append('<div class="mui-input-row mui-checkbox mui-left" >' + xuanzeStr  + '<input  Itemindex="' + i + '" dataindex="' + (k + 1) + '" name="checkbox1" value="Item 1" type="checkbox"   onclick="return false;" itemid="' + data[i].qid + '">' + '</div>')
							} else {
								$("#item" + (i + 1) + " .test-answer-list").append('<div class="mui-input-row mui-checkbox mui-left" >' + xuanzeStr  + '<input  Itemindex="' + i + '" dataindex="' + (k + 1) + '" name="checkbox1" value="Item 1" type="checkbox"   checked="checked"   onclick="return false;" itemid="' + data[i].qid + '">' + '</div>')
							}
						}
					} else if (data[i].qtype == 5) {//上传题
						var pingfen = (data[i].pingfen).toString();
						if (pingfen != null && pingfen != "") {//已被老师评分
							pingfenStr = '<div class="mui-input-row pingfen"style="margin-top: 23px">' + '<label>评分:' + '</label>' + ' <span style="color: red">' + data[i].pingfen + '分' + '</span>' + '</div>'
							$("#scroll-card").find("span").eq(i).removeClass('qusetion-num-normal').addClass('qusetion-num-true');
						} else {
							pingfenStr = '<div class="mui-input-row pingfen"style="margin-top: 23px">' + '<label>评分:' + '</label>' + ' <span style="color: red">' + '请耐心等待老师批改' + '</span>' + '</div>'
						}
						$("#item" + (i + 1)).append('<div class="k-con-part3 clearfix">' + '<span id="itemType" class="k-f18">' + ByIdGetQuestionTypeName(data[i].qtype) + '</span>' + '<p class="k-f16 k-c323 k-mt5 indent-5">' + scoreStr + questionStr + '<p class="k-cred left_10">' + "移动端暂不支持上传题，请在PC端查看！" + '</p>' + '</p>' + '<div class="test-answer-list left_10" >' + '</div>' + '</div>' + pingfenStr)
						//					} else if (data[i].qtype == 9) {//视频题
						//						$("#item" + (i + 1)).append('<div class="k-con-part3 clearfix">' + '<span id="itemType" class="k-f18">' + ByIdGetQuestionTypeName(data[i].qtype) + '</span>' + '<p class="k-f16 k-c323 k-mt5 indent-5">' + (i + 1) + "." + "(" + data[i].qfenshu + "分 " + ")" + htmlspecialchars_decode(data[i].questions) + '<p class="k-cred left_10">' + "移动端暂不支持视频题，请在PC端查看！" + '</p>' + '</p>' + '<div class="test-answer-list left_10"  onclick="return false;" itemtype="' + data[i].qtype + '">' + '</div>' + '</div>')
					}
				} else {
				}
			}
			var mySwiper = new Swiper('.swiper-container', {
				autoHeight : true,
				//					autoplay: 2000,//可选选项，自动滑动
				//用户操作swiper之后，是否禁止autoplay
				autoplayDisableOnInteraction : false,
				//				pagination : '.swiper-pagination',
				direction : 'horizontal',
				loop : false,
			})
			//  试题总数
			//			allQuestionNum(questionLen);
			// 点击答题卡切换
			$("#popover-card span").on("click", function() {
				var index = $(this).index();
				mySwiper.slideTo(index - 1, 1000, false);
				mui('#popover-card').popover('hide')
			});
		}

		//退出考试提示
		function backTestToast() {
			if (api.pageParam.type == 0) {//mocc
				sendBuriedNotifi('1', 'Mocc测验老师批阅结果页', '017');
			} else {
				sendBuriedNotifi('1', '自由课程测验老师批阅结果页', '059');
			}
			if (clickNum == 3) {
				api.closeWin({
				});
			} else {
				//				$("#checkNum").text("是否确定退出当前页");
				//				$('#offlineAlert').show();
				//				clickNum = 2;
				api.closeWin({
				});
			}
		}

		function kebackListen() {
			api.addEventListener({
				name : 'keyback'
			}, function(ret, err) {
				//coding...
				backTestToast();
			});
		}

		function cleanCancel() {
			$('#offlineAlert').hide();
		}

		//确定
		function cleanConfirm() {
			$('#offlineAlert').hide();
			if (clickNum == 1) {
				showProgress();
			} else if (clickNum == 2) {
				backClick();
			}
		}

		//	生成答题卡题号
		function popoverCardNum(questionLen) {
			for (var i = 0; i < questionLen; i++)
				$("#scroll-card").append('<span class=" qusetion-num-normal">' + (i + 1) + '</span>')
		}
	</script>
</html>